package cn.yitun.chat.yitunservercommonlib.converter.dto2vo.system;

import cn.yitun.chat.yitunservercommonlib.dataentity.dto.system.MenuDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.vo.system.MenuVo;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface MenuDto2VoConverter {

    MenuDto2VoConverter INSTANCE = Mappers.getMapper(MenuDto2VoConverter.class);

    MenuDto vo2dto(MenuVo vo);

    List<MenuDto> vo2dto(List<MenuVo> voList);

    @InheritInverseConfiguration
    MenuVo dto2vo(MenuDto dto);

    @InheritInverseConfiguration
    List<MenuVo> dto2vo(List<MenuDto> dtoList);

}
